package xframe.util.db;

import java.util.HashMap;
import java.util.Set;
import java.util.Vector;

import xframe.util.UtilMaster;

public class Row extends HashMap
{
	private Vector v_temp = new Vector();
    public Row()
    {
    		
    }

    public String getNotNull(String key)
    {
        if(get(key) == null)
            return "";
        else
            return (String)get(key);
    }

    public String getDefault(String key, String defaultValue)
    {
        if(get(key) == null)
            return defaultValue;
        else
            return (String)get(key);
    }

    public String getString(String key)
    {
        return (String)get(key);
    }

    public int getInt(String key)
    {
        if(get(key) == null)
            return 0;
        else
            return Integer.parseInt((String)get(key));
    }

    public long getLong(String key)
    {
        if(get(key) == null)
            return 0L;
        else
            return Long.parseLong((String)get(key));
    }
    
    public void putTemp(String key, Object obj){
    	this.put(key, obj);
        v_temp.add(key);
    }
    
    public Vector getTempKeys(){
    	
    	return v_temp;
    }

}
